package com.sunny.design.proxy.dynamicproxy.cglibproxy;

import com.sunny.design.proxy.Customer;
import org.springframework.cglib.core.DebuggingClassWriter;

/**
 * @author Sunny
 * @date 2020/1/1 22:23
 */
public class CGLibProxyTest {
    public static void main(String[] args) {
        //利用 cglib 的代理类可以将内存中的 class 文件写入本地磁盘
        System.setProperty(DebuggingClassWriter.DEBUG_LOCATION_PROPERTY, "E://cglib_proxy_class/");

        Customer instance = (Customer) new CGLibMeiPo().getInstance(Customer.class);
        instance.findLove();
    }
}
